//////////////////////////////////////////////////////////////////////////////////
//
//	Picky Admin
//		- Version 1.0
//		- 04.18.2008
//		- diamond-optic
//
//////////////////////////////////////////////////////////////////////////////////
//
// Information:
//
//	Very basic godmode & noclip plugin made for a request
//
//////////////////////////////////////////////////////////////////////////////////
//
// Changelog:
//
// 	- 11.30.2007 Version 1.0
//		Initial Public Release
//
// 	- 04.18.2008 Version 1.0 (re-release)
//		Updated public cvar format
//
//////////////////////////////////////////////////////////////////////////////////

#include <amxmodx>
#include <amxmisc>
#include <fun>

#define VERSION "1.0"
#define SVERSION "v1.0 - by diamond-optic (www.AvaMods.com)"

public plugin_init()
{
	register_plugin("Picky Admin",VERSION,"diamond-optic")
	register_cvar("amx_pickyadmin_stats",SVERSION,FCVAR_SERVER|FCVAR_SPONLY)
	
	register_concmd("amx_godmode","admin_godmode",ADMIN_BAN,"Toggle god mode")
	register_concmd("amx_noclip","admin_noclip",ADMIN_BAN,"Toggle no-clip")
}

////////////////////////////////////////////////////////////////
//	godmode
//
public admin_godmode(id,level,cid)
{
	if(!cmd_access(id,level,cid,1) || !is_user_connected(id))
		return PLUGIN_HANDLED
		
	if(!get_user_godmode(id))
		{
		set_user_godmode(id,1)
		client_print(id,print_chat,"Godmode ON")
		}
	else
		{
		set_user_godmode(id,0)
		client_print(id,print_chat,"Godmode OFF")
		}
	
	return PLUGIN_HANDLED
}

////////////////////////////////////////////////////////////////
//	noclip
//
public admin_noclip(id,level,cid)
{
	if(!cmd_access(id,level,cid,1) || !is_user_connected(id))
		return PLUGIN_HANDLED
		
	if(!get_user_noclip(id))
		{
		set_user_noclip(id,1)
		client_print(id,print_chat,"No-Clip ON")
		}
	else
		{
		set_user_noclip(id,0)
		client_print(id,print_chat,"No-Clip OFF")
		}
	
	return PLUGIN_HANDLED
}
